home *** CD-ROM | disk | FTP | other *** search
- Path: cs.man.ac.uk!limc
- From: limc@cs.man.ac.uk (S93)
- Newsgroups: comp.lang.c
- Subject: Starting an application in a Borland C program
- Date: 12 Feb 1996 15:09:13 GMT
- Organization: Dept of Computer Science, University of Manchester, U.K.
- Message-ID: <4fnl6p$p2u@m1.cs.man.ac.uk>
- NNTP-Posting-Host: n3i.cs.man.ac.uk
- NNTP-Posting-User: 15113
-
-
- I have tried to start netscape navigator from within my own Borland C program
- using the
- execlp command. But the linker error message > undefined symbol _execlp keeps
- popping up. I
- have definitely define the header file process.h, checked the
- Menu|options|linker, and i even
- add the header file as a node in the project. Is there anybody who can help?
-
- P/s i have included the .c and .rc files below
-
- cheers
- cheeyuen
- ==============================================================================
-
-
- /* NET.C */
-
- #include <stdio.h>
- #include <errno.h>
- #include <stdlib.h>
- #include <process.h>
- #include <windows.h>
-
- #define UNAMEBOX 100
-
- //---------------------------------------------------------------
- // Name: InternetSearchWndProc
- // Purpose: Dialog procedure for internet search dialog.
- //---------------------------------------------------------------
-
- #pragma argsused
-
- BOOL FAR PASCAL _export InternetSearchWndProc (HWND hDlg, UINT Msg,
- WPARAM wParam, LPARAM lParam)
- {
- switch (Msg)
- {
- case WM_INITDIALOG:
-
- SetFocus (GetDlgItem (hDlg, UNAMEBOX));
- return (FALSE);
-
- case WM_COMMAND:
-
- if (wParam == IDCANCEL)
- EndDialog (hDlg, wParam);
- if (wParam == IDOK)
- {
- EndDialog (hDlg, wParam);
- MessageBox(NULL, "Internet search is not implemented. Select OK to assess
- internet manually.", "BDS(Internet Search)", MB_ICONEXCLAMATION | MB_OK);
- execlp("m:\winsock\netscape\netscape.exe", NULL);
- }
- break;
-
- default:
-
- return (FALSE);
- }
-
- return (TRUE);
- }
-
-
- //---------------------------------------------------------------
- // Name: WinMain
- // Purpose: Program entry point
- //---------------------------------------------------------------
-
- #pragma argsused
-
- int PASCAL WinMain (HANDLE hInstance, HANDLE hPrevInstance,
- LPSTR lpCmdLine, int nCmdShow)
- {
- FARPROC lpfnDialogProc;
-
- lpfnDialogProc = MakeProcInstance (InternetSearchWndProc, hInstance);
- DialogBox (hInstance, "INTERNETSEARCH", NULL, lpfnDialogProc);
- FreeProcInstance (lpfnDialogProc);
- return (0);
- }
-
-
-
-
- =========================================================================INTERNE
- ETSEARCH DIALOG 90, 60, 175, 110
- STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
- CAPTION "Business Data System(Internet Search)"
- BEGIN
- DEFPUSHBUTTON "&OK", 1, 33, 80, 35, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
- PUSHBUTTON "&Cancel", 2, 87, 80, 35, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
- LTEXT "Please enter the internet address:", -1, 10, 12, 143, 11, WS_CHILD |
- WS_VISIBLE | WS_GROUP
- EDITTEXT 100, 11, 26, 137, 12, ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER |
- WS_TABSTOP
- LTEXT "Name of share:", -2, 10, 45, 143, 11, WS_CHILD | WS_VISIBLE | WS_GROUP
- EDITTEXT 101, 11, 60, 137, 12, ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER |
- WS_TABSTOP
- END
-
-
-
-